Ext.define('truckplanner.model.Yard', {
    extend: 'Ext.data.Model',
    
    proxy : {
  		type : 'rest',
  		url : '/service/ajax/Yard',
  		reader : {
  			type : 'json',
  			root : 'items',
  			idProperty: 'id',
  			totalProperty: 'length'
  		},
  		writer : {
  			type : 'json',
  			root : 'items',
  			allowSingle : false
  		}
   },
  	
   fields: [{
	      name: 'id',
	      type: 'number'
	  },
	  {
	      name: 'title',
	      type: 'string'
	  },
	  {
	      name: 'name',
	      type: 'string'
	  },
	  {
	      name: 'zip_home',
	      type: 'string'
	  },
	  {
	      name: 'city_home',
	      type: 'string'
	  },
	  {
	      name: 'add_home',
	      type: 'string'
	  },
	  {
	      name: 'zip_yard',
	      type: 'string'
	  },
	  {
	      name: 'city_yard',
	      type: 'string'
	  },
	  {
	      name: 'add_yard',
	      type: 'string'
	  },
	  {
	      name: 'tel',
	      type: 'string'
	  },
	  {
	      name: 'gsm_m',
	      type: 'string'
	  },
	  {
	      name: 'gsm_f',
	      type: 'string'
	  },
	  {
	      name: 'fax',
	      type: 'string'
	  },
	  {
	      name: 'tel_prof',
	      type: 'string'
	  },
	  {
	      name: 'fax_prof',
	      type: 'string'
	  },
	  {
	      name: 'tel_f',
	      type: 'string'
	  },
	  {
	      name: 'fax_f',
	      type: 'string'
	  },
	  {
	      name: 'email',
	      type: 'string'
	  },
	  {
	      name: 'link',
	      type: 'string'
	  },
	  {
	      name: 'foreman',
	      type: 'string'
	  },
	  {
	      name: 'architect',
	      type: 'string'
	  },
	  {
	      name: 'team_go',
	      type: 'string'
	  }]
});